package org.sdp.pearproject.dto.convert;

import org.sdp.pearproject.dao.domain.*;
import org.sdp.pearproject.dto.request.*;
import java.util.Date;

/**
 * @ClassName: ProjectForFileRequestConvert
 * @Description:
 * @Author: SDP
 * @Date: 2022-08-04
 * @Version: 1.0
 * Table: pear_project
 * Comment:
 * 项目表
 */
public class ProjectForFileRequestConvert extends BaseConvert {
    public static ProjectForFile convert(ProjectForFileRequest request) throws Exception {
        ProjectForFile daoRequest = new ProjectForFile();
        copyProperties(request, daoRequest);

        daoRequest.setCode(daoRequest.getCode() == null ? null : daoRequest.getCode().trim());
        daoRequest.setPathName(daoRequest.getPathName() == null ? null : daoRequest.getPathName().trim());
        daoRequest.setTitle(daoRequest.getTitle() == null ? null : daoRequest.getTitle().trim());
        daoRequest.setExtension(daoRequest.getExtension() == null ? null : daoRequest.getExtension().trim());
        daoRequest.setObjectType(daoRequest.getObjectType() == null ? null : daoRequest.getObjectType().trim());
        daoRequest.setOrganizationCode(daoRequest.getOrganizationCode() == null ? null : daoRequest.getOrganizationCode().trim());
        daoRequest.setTaskCode(daoRequest.getTaskCode() == null ? null : daoRequest.getTaskCode().trim());
        daoRequest.setProjectCode(daoRequest.getProjectCode() == null ? null : daoRequest.getProjectCode().trim());
        daoRequest.setCreateBy(daoRequest.getCreateBy() == null ? null : daoRequest.getCreateBy().trim());
        daoRequest.setCreateTime(daoRequest.getCreateTime() == null ? null : daoRequest.getCreateTime().trim());
        daoRequest.setExtra(daoRequest.getExtra() == null ? null : daoRequest.getExtra().trim());
        daoRequest.setFileType(daoRequest.getFileType() == null ? null : daoRequest.getFileType().trim());
        daoRequest.setDeletedTime(daoRequest.getDeletedTime() == null ? null : daoRequest.getDeletedTime().trim());
        daoRequest.setFileUrl(daoRequest.getFileUrl() == null ? null : daoRequest.getFileUrl().trim());
        daoRequest.setFullName(daoRequest.getFullName() == null ? null : daoRequest.getFullName().trim());
        daoRequest.setCreatorName(daoRequest.getCreatorName() == null ? null : daoRequest.getCreatorName().trim());

        return daoRequest;
    }
}
